﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MangeNotices.aspx.cs" Inherits="WebAddressBook.MangeNotices" %>

<%@ Register Src="~/HeaderControl.ascx" TagName="HeaderControl" TagPrefix="uc1" %>
<%@ Register Src="~/CoypyrightControl.ascx" TagName="CoypyrightControl" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="shortcut icon" type="image/png" href="img/favicons/favicon.png" />
    <link rel="icon" type="image/png" href="img/favicons/favicon.png" />
    <link rel="apple-touch-icon" href="img/favicons/apple.png" />
    <!-- Main Stylesheet -->
    <link rel="stylesheet" href="css/style.css" type="text/css" />
    <link rel="stylesheet" href="css/custom.css" type="text/css" />
    <!-- Internet Explorer Fixes -->
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" media="all" href="css/ie.css"/>
    <script src="js/html5.js"></script>
    <![endif]-->
    <!--Upgrade MSIE5.5-7 to be compatible with MSIE8: http://ie7-js.googlecode.com/svn/version/2.1(beta3)/IE8.js -->
    <!--[if lt IE 8]>
    <script src="js/IE8.js"></script>
    <![endif]-->
</head>
<body>
    <form id="form1" runat="server">
    <!-- Header -->
    <uc1:HeaderControl ID="HeaderControl1" runat="server" />
    <!-- End of Header -->
    <!-- Page title -->
    <div id="pagetitle">
        <div class="wrapper">
            <h1>
                通知公告</h1>
            <!-- Quick search box -->
        </div>
    </div>
    <div id="page">
        <!-- Wrapper -->
        <div class="wrapper">
            <!-- Left column/section -->
            <section class="column full first">
             <fieldset>
				  <legend>添加</legend>
                  <p>
                  <label class="required" for="enterprise">企业:</label><br/>
                 <asp:DropDownList ID="DDLEnterprise" runat="server" CssClass="half" 
                      AutoPostBack="True" onselectedindexchanged="DDLEnterprise_SelectedIndexChanged"></asp:DropDownList>
                  </p>
                  <p>
                  <label class="required" for="deptment">部门:</label><br/>
                  <asp:DropDownList ID="DDLDept" runat="server" CssClass="half"></asp:DropDownList>
                  </p>
                  <p>
                  <label class="required" for="deptment">公告标题:</label><br/>
                  <asp:TextBox ID="TBTitle" runat="server" CssClass="half"></asp:TextBox>
                  </p>
                  <p>
                  <label class="required" for="deptment">公告内容:</label><br/>
                  <asp:TextBox ID="TBContent" runat="server" CssClass="half" Height="100px" 
                          TextMode="MultiLine"></asp:TextBox>
                  </p>
                  <p>
                    <asp:Label ID="LbMessage" runat="server" Text=""></asp:Label>
                  </p>
                  <p>
                    <asp:Button ID="BtSave" runat="server" Text="保存" CssClass="btn btn-blue" 
                          onclick="BtSave_Click"></asp:Button>
                  </p>
             </fieldset>
             <fieldset>
             <legend>通知公告列表</legend>
                    <table width="100%">
                            <tr>
                            <td>
                            <p>
                                <label>企业:</label>
                                <asp:DropDownList ID="DDLEnterpriseForSearch" runat="server" CssClass="half" 
                                    AutoPostBack="True" 
                                    onselectedindexchanged="DDLEnterpriseForSearch_SelectedIndexChanged" ></asp:DropDownList>
                           </p>
                            </td>
                            <td>
                            <p>
                                <label>部门:</label>
                                <asp:DropDownList ID="DDLDeptmentForSearch" runat="server" CssClass="half"></asp:DropDownList>
                            </p>
                            </td>
                            <td>
                            <p>
								<label>内容关键字:</label>
								&nbsp;<input type="text" id="content" class="half" runat="server" value="" name="content"/>
                            </p>
                            </td>
                            <td>
                            <p>
                                <asp:Button ID="BtSearch" runat="server" Text="查找" CssClass="btn btn-blue" 
                                    onclick="BtSearch_Click"></asp:Button>
                            </p>
                            </td>
                            </tr>
                            </table>
                 <div>
                 <asp:GridView ID="GVNotices" runat="server" AutoGenerateColumns="False" 
                     CssClass="stylized full" onrowdatabound="GVNotices_RowDataBound" 
                         onrowdeleting="GVNotices_RowDeleting">
                     <Columns>
                         <asp:BoundField DataField="Title" HeaderText="标题" SortExpression="Title" />
                         <asp:BoundField DataField="Contents" HeaderText="内容" 
                             SortExpression="Contents" />
                         <asp:BoundField DataField="DeptName" HeaderText="部门" 
                             SortExpression="DeptName" />
                         <asp:BoundField DataField="PublishTime" HeaderText="发布时间" 
                             SortExpression="PublishTime" />
                         <asp:BoundField DataField="UserName" HeaderText="发布人" 
                             SortExpression="UserName" />
                         <asp:CommandField ShowDeleteButton="True" />
                     </Columns>
                 </asp:GridView>
                 </div>
             </fieldset>
            </section>
        </div>
    </div>
    <!-- Page footer -->
    <div>
        <uc2:CoypyrightControl ID="CoypyrightControl1" runat="server" />
    </div>
    <!--End Page footer -->
    </form>
</body>
</html>
